package com.etc.dao;

import com.etc.entity.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface CommentMapper {
	int deleteByPrimaryKey(Integer comid);

	int insert(Comment record);

	int insertSelective(Comment record);

	Comment getByPrimaryKey(Integer comid);

	int updateByPrimaryKeySelective(Comment record);

	int updateByPrimaryKey(Comment record);

	List<Comment> getByPage(Integer start, Integer limit, String content);

	int countComment(String content);
	
	//根据景点id查所属评论
	List<Comment> getByTraid(Integer traId);
	
	int countCommentByTraid(Integer traId);
}